From: Alan Mackenzie Date: Thu, 3 Oct 2019 14:26:14 +0000 (+0000) Subject: C++ Mode: Correct the fontification of const auto foo X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~19^2~1702 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=dacafba03d8cbd6132d84f5c73b61e2ebee6b85a;p=emacs.git C++ Mode: Correct the fontification of const auto foo * lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): Correct a coding error involving `and' and `or'. --- diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index d1cca115f3a..4ca440fd84b 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -9714,12 +9714,12 @@ This function might do hidden buffer changes." (c-forward-syntactic-ws)) - (when (or (and new-style-auto - (looking-at c-auto-ops-re)) - (and (or maybe-typeless backup-maybe-typeless) - (not got-identifier) - (not got-prefix) - at-type)) + (when (and (not got-identifier) + (or (and new-style-auto + (looking-at c-auto-ops-re)) + (and (or maybe-typeless backup-maybe-typeless) + (not got-prefix) + at-type))) ;; Have found no identifier but `c-typeless-decl-kwds' has ;; matched so we know we're inside a declaration. The ;; preceding type must be the identifier instead.